var mongoose = require("mongoose");

// 创建规则
var rule = new mongoose.Schema({
    author: {
        type: String,
        required: true,
    },
    sex: {
        type: String,
    },
    age: {
        type: Number,
    },
    city: {
        type: String,
    }
}, {
    timestamps: true
});

// 把规则对应到一张具体的表，没有则创建
module.exports = db.model('msgs', rule);



